
import { ref } from 'vue';

// 弹框的数据
let dialogData = ref({
  "area": "",
  "industry": "",
  "isAlert": false,
  "isMerchant": false,
  "merchant": ""
})
// 是否打开弹框
let dialogDataShow  = ref(true)
// 是否禁用menu
let menuOpen = ref(false)
// 是否是单位系统
let isUnits  = ref(false)
// 是否折叠弹框
let menuRef = ref(null)


export function useDialogData() {

  function updateDialogData(data) {
    dialogData.value = data
  }
  function updateDialogDataShow(data){
    dialogDataShow.value = data
  }
  function updateMenuOpen(data){
    menuOpen.value = data
  }
  function updateIsUnits(data){
    isUnits.value = data
  }
  function updateMenuRef(data){
    menuRef.value = data
  }

  return {
    updateDialogData,
    dialogData,
    dialogDataShow,
    updateDialogDataShow,
    menuOpen,
    updateMenuOpen,
    isUnits,
    updateIsUnits,
    menuRef,
    updateMenuRef

  }
}
